<table>
  <thead></thead>
  <tbody>
    <tr>
	  <% if @products != nil %>
		  <% @products.each do |product| %>
		  <td>
			<%= image_tag product.pic %><br/>
			<%= link_to product.name, "/products/#{product.id}" %><br/>
			<%= product.price %><br/>
			<% if session['user'] != nil %>
				<%= link_to 'Comprar', "/cart/add/#{product.id}", :remote => true %>
			<% end %>
		  </td>
		  <% end %>
	   <% end %>
    </tr>
  </tbody>
</table>
